﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin_page.master" AutoEventWireup="true" CodeBehind="stocks_list.aspx.cs" Inherits="YXShop.Web.admin.stocks.stocks_list" %>
<asp:Content ID="ContentHead" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" href="../style/validator.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/validate.js"></script>
    <link rel="stylesheet" href="../style/toolbar.css" type="text/css" />
    <script src="../scripts/public.js" type="text/javascript"></script>
    <script src="../scripts/images.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function Delete(id) {
            var l;
            if (id < 0) {
                l = GetAllChecked();
                if (l == "") {
                    alert("您没有选择要删除的信息!");
                    return;
                }
            }
            else {
                l = id;
            }
            if (confirm('确定要永久删除您所选择的信息吗?该信息将不能被恢复!')) {
                SendAjax("del", l);
            }
        }
        function Del(id) {
            var idStr;
            if (id < 0) {
                idStr = GetAllChecked();
                if (idStr == "") {
                    alert("您没有选择要删除的信息!");
                    return;
                }
            }
            else {
                idStr = id
            }
            if (confirm('确定要永久删除该信息吗?删除后将不能被恢复!')) {
                var param = "Option=del&id=" + idStr;
                var options =
            { method: 'post', parameters: param, onComplete:
                 function (transport) {
                     var retv = transport.responseText;
                     if (retv == "ok") {
                         window.location.reload();
                     }
                     else if (retv == "no") {
                         alert("对不起，你没有删除权限！");
                     }
                 }
            }
            }
            else {
                return false;
            }
            new Ajax.Request('product_list.aspx', options);
        }
        function Barch() {
            var idStr = GetAllChecked();
            if (idStr == "") {
                alert("您没有选择要批量编辑的信息!");
                return;
            }
            window.location.href = 'product_batch_edit.aspx?barchId=' + idStr;
        }
        function SelectAll(tempControl) {
            var theBox = tempControl;
            xState = theBox.checked;
            elem = theBox.form.elements;
            for (i = 0; i < elem.length; i++)
                if (elem[i].type == 'checkbox' && elem[i].id != theBox.id) {
                    if (elem[i].checked != xState)
                        elem[i].click();

                }
            }
            function OutProduct() {
                var idStr = GetAllChecked();
                if (idStr == "") {
                    alert("您没有选择要批量出库的商品信息!");
                    return;
                }
                window.location.href = '../stocks/Out_Stocks_Edit.aspx?barchId=' + idStr;
            }
    
    </script>
    <script src="../scripts/images.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="ContentTitle" ContentPlaceHolderID="pagetitle" runat="server">
库存列表
        <br />
</asp:Content>
<asp:Content ID="ContentInfo" ContentPlaceHolderID="pageinfo" runat="server">
</asp:Content>
<asp:Content ID="ContentSarch" ContentPlaceHolderID="pagesarch" runat="server">
    查询条件：<asp:Button ID="butSearch" runat="server" CssClass="inputbutton" onclick="linkQuery_Click" Text="查  询" onMouseOver="javascript:document.getElementById(this.id).className='inputbutton_a'" onMouseOut="javascript:document.getElementById(this.id).className='inputbutton'"/>
    <asp:DropDownList ID="DropDownList1" runat="server" Height="21px" 
        onselectedindexchanged="DropDownList1_SelectedIndexChanged" Width="98px" 
        AutoPostBack="True">
        <asp:ListItem Value="4" Selected="True">所有仓库</asp:ListItem>
        <asp:ListItem Value="0">中央仓库</asp:ListItem>
        <asp:ListItem Value="1">区域中心</asp:ListItem>
        <asp:ListItem Value="2">门店</asp:ListItem>
    </asp:DropDownList>
    仓库名称：<asp:HiddenField ID="hf_stockstypeid" runat="server" />
    <asp:HiddenField ID="hf_where" runat="server" />
    <asp:TextBox ID="txtCenter" runat="server" ReadOnly="True">所有仓库</asp:TextBox>
    <asp:TextBox ID="txtAreaStore" runat="server" ReadOnly="True" Visible="False"></asp:TextBox>
    <asp:TextBox ID="txtStore" runat="server" Visible="False" ReadOnly="True"></asp:TextBox>
            <asp:DropDownList ID="DropDownListState" runat="server" Height="21px" 
            Width="149px">
            <asp:ListItem Value="-1">所有状态</asp:ListItem>
            <asp:ListItem Value="0">订购</asp:ListItem>
            <asp:ListItem Value="1">入库</asp:ListItem>
            <asp:ListItem Value="2">出库</asp:ListItem>
            <asp:ListItem Value="4">退货</asp:ListItem>
            <asp:ListItem Value="3">售出</asp:ListItem>
            <asp:ListItem Value="5">删除</asp:ListItem>
        </asp:DropDownList>
            <asp:HiddenField runat="server" ID="w_d_pro_PutoutType" />
            <asp:HiddenField ID="hfStoreCenterid" runat="server" />
    <asp:HiddenField ID="hfStoreid" runat="server" />
            &nbsp;<asp:HiddenField runat="server" ID="w_d_pro_CID" />
            <span runat="server" id="OptionMember">
            <asp:HiddenField runat="server" ID="w_d_pro_PutoutID" />
           商品名称：
            <asp:TextBox ID="w_l_pro_Name" runat="server"></asp:TextBox>
            </span>
</asp:Content>
<asp:Content ID="ContentSpace" ContentPlaceHolderID="workspace" runat="server">
   <asp:Panel ID="pnlMsg" runat="server" Visible="false" CssClass="pnlReturnMessageErr">
    <asp:Literal ID="ltlMsg" runat="server"></asp:Literal>
</asp:Panel>
<asp:Literal ID="lblList" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="ContentBottom" ContentPlaceHolderID="pagebottom" runat="server">
    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="#" 
        onclick="OutProduct()" Text="批量出库"   CssClass="inputbutton" Width="65px" 
        Height="24px" 
        onMouseOver="javascript:document.getElementById(this.id).className='inputbutton_a'" 
        onMouseOut="javascript:document.getElementById(this.id).className='inputbutton'"></asp:HyperLink>
    <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="#" 
        onclick="OutProduct()" Text="批量退货"   CssClass="inputbutton" Width="65px" 
        Height="24px" 
        onMouseOver="javascript:document.getElementById(this.id).className='inputbutton_a'" 
        onMouseOut="javascript:document.getElementById(this.id).className='inputbutton'"></asp:HyperLink>
</asp:Content>
